{extend name="public/layout" /}
{block name="head"}{/block}
{block name="body"}

<body>
<div class="container-fluid p-t-15">
  <div class="card">
    <div class="card-body">
      <form class="form-horizontal" id="form" data-call="refreshPage">
        <div class="form-group">
          <label class="col-sm-2 col- control-label">上级规则</label>
          <div class="col-sm-10">
            {:\\helper\\Form::_select('pid',$info.pid,[
            "empty-option"=>"0|==顶级规则==",
            "items-data"=>$list,
            "items-key"=>"id",
            "items-name"=>"_name"
            ])}
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">权限名称</label>
          <div class="col-sm-10">
            {:\\helper\\Form::_text('title',$info.title,[
            "datatype"=>"*"
            ])}
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">权限规则</label>
          <div class="col-sm-10">
            {:\\helper\\Form::_text('name',$info.name,[
            "datatype"=>"*"
            ])}
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">状态</label>
          <div class="col-sm-6">
            {:\\helper\\Form::_radio('status',$info.status,[
            "items-data"=>"D:Dict:getDictByClass:10.13",
            "items-key"=>"dict_code",
            "items-name"=>"dict_value",
            ])}
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">排序</label>
          <div class="col-sm-10">
            {:\\helper\\Form::_number('show_order',$info.show_order,[
            "datatype"=>"n"
            ])}
          </div>
        </div>
        <div class="form-group">
          <div class="col-sm-10 col-sm-offset-2">
            <div class="pull-left">
              <button type="button" class="btn btn-primary btn-sub">保存</button>
              <button type="button" class="btn btn-default btn-reset">重置</button>
            </div>
            <div class="pull-left m-l-15">
              <p class="error-msg"></p>
            </div>
          </div>
        </div>
      </form>
    </div>
  </div>
</div>
<script>
  formHelper.init();
  formHelper.subForm();
</script>
</body>
{/block}